Error handling
Use
cl_strerror
to convert error codes into human readable messages. The function returns a statically allocated string:
if(ret) { printf("cl_loaddbdir() error: %s\n", cl_strerror(ret)); exit(1); }